
#include "list.h"

#include <stdio.h>
#include <stdlib.h>

static void print(const char *what) {
	printf("%s\n", what) ;
}

enum TEST_CASES {
	eTestConstruction = 0,
	eTestAdders,
	eTestAccessors,
	eTestRemovers,
	
	eTestNum
} ;

static void test_construction(void) ;
static void test_adders(void) ;
static void test_accessors(void) ;
static void test_removers(void) ;

static void (* tests[])(void) = 
{
	test_construction,
	test_adders,
	test_accessors,
	test_removers,
	NULL
} ;

int main(int argc, char **argv) {
	int n = argc >= 2 ? 
		atoi(argv[1]) : 
		sizeof(tests) / sizeof(*tests) - 1 ;
	
	if(tests[n]) {
		tests[n]() ;
	} else {
		void (** fn)(void) = tests ;
		for(; *fn; ++fn) {
			(*fn)() ;
		}
	}
	
	return 0 ;
}

static void test_construction(void) {
	print("testing construction") ;
}

static void test_adders(void) {
	print("testing push/insert") ;
}

static void test_accessors(void) {
	print("testing accessors") ;
}

static void test_removers(void) {
	print("testing removers") ;
}
